<template>
  <div class="itemBodys">
    <echarts v-if="list.length>0" :list="list"></echarts>
  </div>
</template>

<script>
import echarts from "./components/echarts.vue";
import {temperatureHumidity} from "@/api/api/LargeScreenData.js";

export default {
  data() {
    return {
      list: []
    }
  },
  components: {echarts},
  mounted() {
    this.getData()
  },
  methods: {
    async getData() {
      try {
        const res = await temperatureHumidity();
        this.list = res.data
      } catch (err) {
        console.error(err);
      }
    },
  },
}
</script>

<style lang="scss" scoped>
.itemBodys {
  width: 100%;
  position: relative;
  height: calc(100% - 0px);
}

.echartsBody {
  position: relative;
  width: 100%;
  height: calc(100% - 0px);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;
}
</style>
